<template>
	<view class="templ_orderlist">
		<!-- 订单项 单个 -->
		<!-- 
		 @click="toDetail(orderitem)"
		 -->
		<view class="tripOrderItem">

			<!--  -->
			<view class="trip_head FlexBetween">
				<view class="trip_left FlexAlign">
					<view class="title">
						{{orderitem.order_type_desc}}

					</view>

				</view>

				<view class="price FlexAlign">
					<view class="pval">
						{{orderitem.order_amount || 0.00}}元
					</view>
				</view>

			</view>
			<!--  -->
			<view class="trip_time">
				下单时间：{{orderitem.create_time}}
			</view>
			<!--  -->
			<!-- 6.企业用车 -->
			<template v-if="orderitem.order_type == 6 && orderitem.enterprise_units_apply_id">
				<view class="infos_line m-t-10" v-if="orderitem.enterprise_units_apply_snap.use_time">
					预约用车时间：
					<text>
						{{orderitem.enterprise_units_apply_snap.use_time}}
					</text>
				</view>
				<view class="infos_line " v-if="orderitem.enterprise_units_apply_snap.car_type_desc">
					用车车型：
					<text>
						{{orderitem.enterprise_units_apply_snap.car_type_desc}}
					</text>
				</view>
				<view class="infos_line" v-if="orderitem.enterprise_units_apply_snap.contact_phone">
					联系电话：
					<text>
						{{orderitem.enterprise_units_apply_snap.contact_phone}}
					</text>
				</view>
				<view class="infos_line" v-if="orderitem.enterprise_units_apply_snap.contact_name">
					联系人：
					<text>
						{{orderitem.enterprise_units_apply_snap.contact_name}}
					</text>
				</view>
			</template>
			<!-- 7.包车 -->
			<template v-if="orderitem.order_type == 7 && orderitem.chartered_bus_apply_snap">
				<view class="infos_line m-t-10" v-if="orderitem.ctta_snap">
					包车车型: {{orderitem.chartered_bus_apply_snap.car_type_desc}}
				</view>
				<view class="infos_line">
					用车开始时间: {{orderitem.chartered_bus_apply_snap.use_start_time}}
				</view>
				<view class="infos_line">
					用车开始结束: {{orderitem.chartered_bus_apply_snap.use_end_time}}
				</view>
				<view class="infos_line">
					联系人: {{orderitem.chartered_bus_apply_snap.contact_name}}
				</view>
				<view class="infos_line">
					联系电话: {{orderitem.chartered_bus_apply_snap.contact_phone}}
				</view>
			</template>

			<!--  -->
			<view class="trip_bottom FlexBetween" v-if="botshow">
				<div class="userArea FlexAlign">
					<div class="userImg">

						<u-image :lazy-load="true" :src="orderitem.buyer_avatar" width="100%" height="100%">
							<u-loading slot="loading"></u-loading>
						</u-image>
					</div>
					<div class="userName">
						{{orderitem.buyer_nickname}}
					</div>
				</div>
				<div class="botright FlexAlign">
					<div class="tit">
						本单预估收益:
					</div>
					<div class="txt">
						{{orderitem.earnings}}元
					</div>
				</div>
			</view>
		</view>


	</view>
</template>

<script>
	import travelroute from "@/bundle4/pages/through/components/travelroute.vue"
	// 
	export default {
		props: {
			orderitem: {
				type: [Object, String],
				default: () => {
					return {}
				}
			},
			botshow: {
				type: Boolean,
				default: true,
			},
			stautshow: {
				type: Boolean,
				default: true,
			},

		},
		components: {
			travelroute,
		},
		data() {
			return {

			}
		},
		methods: {


			// 详情
			toDetail(item) {
				uni.navigateTo({
					url: `/bundle4/pages/order/orderdetail?id=${item.id}`
				});
			},
		},
	}
</script>

<style lang="scss" scoped>
	@import "@/bundle4/css/Flex.scss";
	@import "@/bundle4/css/dlist.scss";

	.trip_bottom {
		.userArea {
			.userImg {
				border: solid 1px #eee;
				width: 40rpx;
				height: 40rpx;
				border-radius: 100%;
				margin-right: 12rpx;
				overflow: hidden;
			}

			.userName {
				font-size: 26rpx;
				font-weight: 400;
				color: rgba(38, 38, 38, 1);
			}
		}

		.botright {
			.tit {
				font-size: 26rpx;
				font-weight: 400;
				color: rgba(153, 153, 153, 1);
			}

			.txt {
				font-size: 26rpx;
				font-weight: 400;
				color: rgba(38, 38, 38, 1);

			}
		}
	}
</style>